-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aspellDicts: add more dictionaries and some documentation #34798
Conversation
fullName = "English Computer Jargon"; | ||
|
||
src = fetchurl { | ||
url = https://mrsatterly.com/spelling_computer.txt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this redirects
d04939a
to
7c79305
Compare
this redirects
Fixed, I hope.
|
@GrahamcOfBorg eval |
|
||
langInputs = [ en ]; | ||
|
||
phases = [ "preBuild" "buildPhase" "installPhase" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In both cases you set phases
, why? Should this be improved in buildDict
?
9d0f039
to
10a3068
Compare
In both cases you set `phases`, why? Should this be improved in `buildDict`?
s/you/the author/
I wondered myself, but now it seems that it is by design. `preBuild`
simply defines a bunch of functions, `buildPhase`s and `installPhases`s
are different for different derivations, other default phases would
either fail or are useless.
But its true I can just move it to `buildDict`. Done. Also made another
trivial change.
|
buildDict = | ||
{langInputs ? [], ...}@args: | ||
buildLang ({ | ||
propagatedUserEnvPackages = langInputs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not be using propagatedUserEnvPackages
|
||
~~~~ | ||
environment.systemPackages = [ | ||
aspellDicts.en |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and aspell itself?
|
||
with lib; | ||
|
||
/* HOWTO: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only considers the method where dicts are installed separate from aspell, and not aspellWithDicts
. Perhaps there is a better place for this comment? Otherwise, it's good to have the explanation!
~~~~ | ||
master en_US | ||
extra-dicts en-computers.rws | ||
add-extra-dicts en_US-science.rws |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these needed? Should it not detect them?
shortName = "ca-2.1.5-1"; | ||
fullName = "Catalan"; | ||
src = fetchurl { | ||
url = mirror://gnu/aspell/dict/ca/aspell6-ca-2.1.5-1.tar.bz2; | ||
url = "mirror://gnu/aspell/dict/ca/aspell6-ca-2.1.5-1.tar.bz2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quotes are not needed, and until the policy changes, they should not be included either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's super annoying when upgrading a literal URL to a ${version}
or ${name}
one. Has this policy finally been written down somewhere?
|
||
ca = buildDict { | ||
/* Function to compile txt dict files into Aspell dictionaries. */ | ||
buildDict = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about creating instead a src
that can be consumed by the old buildDict
? Any reason for not doing that?
build in the exact same way. */ | ||
buildDict = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any motivation for changing the name?
10a3068
to
fbb9d9b
Compare
We should not be using `propagatedUserEnvPackages`
Any suggestions with what to replace it with? You should have `en_US` in the
profile when installing `en_US-science`.
and aspell itself?
Fixed.
This only considers the method where dicts are installed separate from aspell, and not `aspellWithDicts`. Perhaps there is a better place for this comment? Otherwise, it's good to have the explanation!
The problem with `aspellWithDicts` is that it does `--set ASPELL_CONF` which breaks the above explanation.
You would need to implement `aspellWithDictsAndConfig` to make this work. This is outside of scope of this PR.
Why are these needed? Should it not detect them?
They are "extra", opt-in.
Quotes are not needed, and until the policy changes, they should not be included either.
Official source on that claim? I'm motivated by #27809.
How about creating instead a `src` that can be consumed by the old `buildDict? Any reason for not doing that?
Pack files into an archive just to unpack them at the next beta-reduction? Seems crazy to me.
Any motivation for changing the name?
Right. Fixed.
|
fe141f7
to
0f8fe1a
Compare
Well whatever, the last patch has gone to SLNOS. To make my position clear: I see no policy behind #27809. What I see is somebody making a huge change to nixpkgs that goes backwards and you merging it without discussion. |
The closest would be
See #34856.
Agreed. |
The closest would be `aspellWithDicts`, for installing individual packages there is nothing else.
Right. But if I removed the propagation now it would break plain `systemPackages` installs.
Unless you put a check into `systemPackages` that rejects dictionaries I think the current impl is the correct one.
> The problem with `aspellWithDicts` is that it does `--set ASPELL_CONF` which breaks the above explanation.
See #34856.
Looks ok to me, needs extensive testing.
I propose we merge this first as it is well-tested (a whole year of fermentation in SLNOS) and makes things strictly better.
You can always change the docstrings later when `aspellWithDicts` becomes awesome.
|
0f8fe1a
to
3f9ada0
Compare
OK, looks like this version is pure addition. |
Motivation for this change
Jargon files.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"